<!-- 设置 -->
<template>
	<view>
		<u-navbar :isFixed="true" title="设置" :borderBottom="false"></u-navbar>
		<view class="line"></view>
		<view class="wrap">
			<view class="item flex_bet_align">
				<view class="title">手机号</view>
				<view class="content" @click="phone(mobiles)">{{mobiles}}<text></text></view>
			</view>
			<navigator url="aboutUs" hover-class="none" class="item flex_bet_align">
				<view class="title">关于平台</view>
				<view class="content">查看平台简介<text class="iconfont icon-xwtubiaoku-03"></text></view>
			</navigator>
			<view class="item flex_bet_align">
				<view class="title">服务热线</view>
				<view class="content" @click="phone(tel)">{{tel}}<text></text></view>
			</view>
			<navigator url="/home/login/reading?name=免责说明&type=9" hover-class="none" class="item flex_bet_align">
				<view class="title">免责说明</view>
				<view class="content">查看详情<text class="iconfont icon-xwtubiaoku-03"></text></view>
			</navigator>
			<navigator url="/home/login/reading?name=社区协议&type=8" hover-class="none" class="item flex_bet_align">
				<view class="title">社区协议</view>
				<view class="content">查看详情<text class="iconfont icon-xwtubiaoku-03"></text></view>
			</navigator>
			<navigator url="/home/login/reading?name=用户协议&type=1" hover-class="none" class="item flex_bet_align">
				<view class="title">用户协议</view>
				<view class="content">查看详情<text class="iconfont icon-xwtubiaoku-03"></text></view>
			</navigator>
			<navigator url="/home/login/reading?name=隐私协议&type=2" hover-class="none" class="item flex_bet_align">
				<view class="title">隐私协议</view>
				<view class="content">查看详情<text class="iconfont icon-xwtubiaoku-03"></text></view>
			</navigator>
		</view>
		<button class="goout" @click="goout">退出登录</button>
	</view>
</template>

<script>
	var _this;
	export default {
		data() {
			return {
				mobiles:"",
				tel:"",
			}
		},
		onLoad(options) {
			_this = this
			_this.getdata()
		},
		methods: {
			// 获取数据
			getdata() {
				_this.$api.get("setup", {}).then(data => {
					// _this.list = data
					_this.mobiles=data.mobile
					_this.tel=data.tel
				});
			},
			phone(value){
				uni.makePhoneCall({
					phoneNumber:value.toString()
				})
			},
			goout(){
				uni.showModal({
				    content: '确定退出账号？',
				    success: function (res) {
				        if (res.confirm) {
							uni.removeStorageSync("client_uid")
							uni.removeStorageSync("token")
				            uni.navigateTo({
				            	url:"/pages/index/index"
				            })
				        }
				    }
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.line{
		height: 10rpx;
		background-color: #F2F2F2;
	}
	.wrap{
		padding: 0 30rpx 0 30rpx;
		.item{
			padding:50rpx 0 45rpx;
			border-bottom: 1rpx solid #E6E6E6;
			font-size: 30rpx;
			font-family: PingFang SC, PingFang SC-Medium;
			font-weight: 500;
			text-align: left;
			line-height: 38rpx;
			.title{
				color: #333333;
			}
			.content{
				color: #999999;
				text{
					margin-left:40rpx;
				}
			}
		}
	}
	.goout{
		position: fixed;
		left:35rpx;
		width: 680rpx;
		height: 90rpx;
		background: -webkit-linear-gradient(4deg, #38BE8C, #05ADBB);
		background: linear-gradient(86deg, #38BE8C, #05ADBB);
		border-radius: 45rpx;
		line-height: 90rpx;
		text-align: center;
		color: #fff;
		font-size: 34rpx;
		font-weight: bold;
		margin-top: 40rpx;
		bottom: 40rpx;
	}
</style>
